﻿using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Bird.Data
{
    public class DataSettingsHelper
    {
        public static bool Initialize()
        {
            Database.DefaultConnectionFactory = new SqlCeConnectionFactory("System.Data.SqlServerCe.4.0");
            var context = new BirdObjectContext("test");
            if (!context.Database.Exists())
            {
                context.Database.Create();
                new MemberInitialize(new EfRepository<Core.Domain.Members.Member>(context));
            }
            return true;
        }
    }
}
